@using System.Web.Profile;
@{
    var _profile = ProfileBase.Create(ViewData["UserName"].ToString());
    var _user = Membership.GetUser(ViewData["UserName"].ToString());
    var avatar = _user.GetAvatar();
    Layout = "~/Views/Shared/_LayoutPartial.cshtml";
    ViewBag.ImageUrl = "~/Content/Images/icon_user_48.png";
    ViewBag.Title = _user.GetDisplayName();
}
<div style="padding: 20px;">
    <table style="width: 100%">
        <tr>
            <td style="width: 250px;">
                <table style="width: 100%">
                    <tr>
                        <td colspan="2" style="text-align: center;">
                            <div class="d-avatar">
                                <img src="@Url.Content(avatar)" alt="" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div style="text-align: center;" class="ui-state-highlight ui-corner-all">
                                <span style="font-size: 200%;">@Html.Global((int)_profile["Points"])</span> @Html.Global("RES_POINTS")</div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.Global("RES_STATUS"):
                        </td>
                        <td>
                            @if (Membership.GetUser(_profile.UserName).IsOnline)
                            { 
                                <span class="dna-ui-icon dna-ui-icon-online" style="float: left;"></span>
                                @Html.Global("RES_ONLINE")
                            }
                            else
                            {
                                <span class="dna-ui-icon dna-ui-icon-offline" style="float: left;"></span>
                                @Html.Global("RES_OFFLINE")
                            }
                        </td>
                    </tr>
                    @if (!string.IsNullOrEmpty(_profile["Location"] as string))
                    {
                        <tr>
                            <td style="min-width: 80px;">
                                @Html.Global("RES_LOCATION"):
                            </td>
                            <td>
                                @_profile["Location"]
                            </td>
                        </tr>
                    }
                    <tr>
                        <td>
                            @Html.Global("RES_REGISTERED"):
                        </td>
                        <td>
                            @Html.Global(Membership.GetUser(_profile.UserName).CreationDate)
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            @Html.Global("RES_LAST_LOGIN"):
                        </td>
                        <td>
                            @Html.Global(_profile.LastActivityDate)
                        </td>
                    </tr>
                </table>
            </td>
            <td style="vertical-align: top;">
                <table style="width: 100%">
                    @if (!string.IsNullOrEmpty(_profile["Facebook"] as string))
                    {
                        <tr>
                            <td>
                                Facebook
                            </td>
                            <td>
                                @Ajax.Dna().Link("http://www.facebook.com/" + _profile["Facebook"].ToString()).Text(_profile["Facebook"].ToString()).ImageIcons(Url.Content("~/content/images/icon_facebook_16.png")).GetHtml()
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["Twitter"] as string))
                    { 
                        <tr>
                            <td>
                                Twitter
                            </td>
                            <td>
                                @Ajax.Dna().Link("http://www.twitter.com/" + _profile["Twitter"].ToString()).Text(_profile["Twitter"].ToString()).ImageIcons(Url.Content("~/content/images/icon_twitter_16.png")).GetHtml()
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["WebSite"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; min-width: 80px;">
                                @Html.Global("RES_WEBSITE")
                            </td>
                            <td>
                                <a target="_blank" href="@_profile["WebSite"]"><span style="float: left;" class="forum-icon forum-icon-web">
                                </span>
                                    @_profile["WebSite"]</a>
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["MSN"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; width: 80px;">
                                @Html.Global("RES_MSN")
                            </td>
                            <td>
                                <a target="_blank" href=""><span style="float: left;" class="forum-icon forum-icon-msn">
                                </span>
                                    @_profile["MSN"] </a>
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["Yahoo"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; width: 80px;">
                                @Html.Global("RES_YAHOO")
                            </td>
                            <td>
                                <a target="_blank" href="http://edit.yahoo.com/config/send_webmesg?.target=@_profile["Yahoo"]&.src=pg">
                                    <span class="forum-icon forum-icon-yahoo" style="float: left;"></span>
                                    @_profile["Yahoo"]</a>
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["Email"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; width: 80px;">
                                @Html.Global("RES_EMAIL")
                            </td>
                            <td>
                                <a target="_blank" href="javascript:portal.mail('@_profile["Email"]');void(0);"><span
                                    class="forum-icon forum-icon-email" style="float: left;"></span>
                                    @_profile["Email"]</a>
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["Blog"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; width: 80px;">
                                @Html.Global("RES_BLOG")
                            </td>
                            <td>
                                <a target="_blank" href="@_profile["Blog"]"><span style="float: left;" class="forum-icon forum-icon-blog">
                                </span>
                                    @_profile["Blog"]</a>
                            </td>
                        </tr>
                    }
                    @if (!string.IsNullOrEmpty(_profile["ICQ"] as string))
                    {
                        <tr>
                            <td style="white-space: nowrap; width: 80px;">
                                @Html.Global("RES_ICQ")
                            </td>
                            <td>
                                <a target="_blank" href="@_profile["ICQ"]"><span style="float: left;" class="forum-icon forum-icon-icq">
                                </span>
                                    @_profile["ICQ"]</a>
                            </td>
                        </tr>
                    }
                </table>
            </td>
            <td style="width: 300px; vertical-align: top;">
                @if (!string.IsNullOrEmpty(_profile["Signature"] as string))
                {
                    @MvcHtmlString.Create(_profile["Signature"].ToString())
                }
            </td>
        </tr>
    </table>
</div>
